#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Core;
using Cephei.Core.Generic;
using Microsoft.FSharp.Core;
using Cephei.QL.Times;
using Cephei.QL;
using Cephei.QL.Indexes;
namespace Cephei.QL.Instruments
{
    /// <summary> 
	/// ! Quoted as a fixed rate \f$ K \f$.  At start: \f[ P_n(0,T) N [(1+K)^{T}-1] = P_n(0,T) N \left[ \frac{I(T)}{I(0)} -1 \right] \f] where \f$ T \f$ is the maturity time, \f$ P_n(0,t) \f$ is the nominal discount factor at time \f$ t \f$, \f$ N \f$ is the notional, and \f$ I(t) \f$ is the inflation index value at time \f$ t \f$.  This inherits from swap and has two very simple legs: a fixed leg, from the quote (K); and an indexed leg.  At maturity the two single cashflows are swapped.  These are the notional versus the inflation-indexed notional Because the coupons are zero there are no accruals (and no coupons).  Inflation is generally available on every day, including holidays and weekends.  Hence there is a variable to state whether the observe/fix dates for inflation are adjusted or not.  The default is not to adjust.  A zero inflation swap is a simple enough instrument that the standard discounting pricing engine that works for a vanilla swap also works.  \note we do not need Schedules on the legs because they use one or two dates only per leg.
	/// </summary>
    [Guid ("CF5172E2-5C40-436c-B281-59BA356609C5"),ComVisible(true)]
	public interface IZeroCouponInflationSwap : Cephei.QL.Instruments.ISwap
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        /// <summary> 
		/// 
		/// </summary>
		 Double FairRate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double FixedRate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Times.IDayCounter DayCounter {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.ICashFlow> FixedLeg {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double FixedLegNPV {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Indexes.IZeroInflationIndex InflationIndex {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.Core.IVector<Cephei.QL.ICashFlow> InflationLeg {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double InflationLegNPV {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Double Nominal {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Times.IPeriod ObservationLag {get;}
        /// <summary> 
		/// ASC091131 Add missing function
		/// </summary>
		 QL.Instruments.ZeroCouponInflationSwap.TypeEnum Type {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Boolean AdjustObservationDates {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Times.ICalendar FixedCalendar {get;}
        /// <summary> 
		/// 
		/// </summary>
		 QL.Times.BusinessDayConventionEnum FixedConvention {get;}
        /// <summary> 
		/// 
		/// </summary>
		 Cephei.QL.Times.ICalendar InflationCalendar {get;}
        /// <summary> 
		/// 
		/// </summary>
		 QL.Times.BusinessDayConventionEnum InflationConvention {get;}
        /// <summary> 
		/// 
		/// </summary>
		 DateTime MaturityDate {get;}
        /// <summary> 
		/// 
		/// </summary>
		 DateTime StartDate {get;}
    }   

    /// <summary> 
	/// ! Quoted as a fixed rate \f$ K \f$.  At start: \f[ P_n(0,T) N [(1+K)^{T}-1] = P_n(0,T) N \left[ \frac{I(T)}{I(0)} -1 \right] \f] where \f$ T \f$ is the maturity time, \f$ P_n(0,t) \f$ is the nominal discount factor at time \f$ t \f$, \f$ N \f$ is the notional, and \f$ I(t) \f$ is the inflation index value at time \f$ t \f$.  This inherits from swap and has two very simple legs: a fixed leg, from the quote (K); and an indexed leg.  At maturity the two single cashflows are swapped.  These are the notional versus the inflation-indexed notional Because the coupons are zero there are no accruals (and no coupons).  Inflation is generally available on every day, including holidays and weekends.  Hence there is a variable to state whether the observe/fix dates for inflation are adjusted or not.  The default is not to adjust.  A zero inflation swap is a simple enough instrument that the standard discounting pricing engine that works for a vanilla swap also works.  \note we do not need Schedules on the legs because they use one or two dates only per leg. Factory
	/// </summary>
   	[ComVisible(true)]
    public interface IZeroCouponInflationSwap_Factory 
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary> 
		/// Generally inflation indices are available with a lag of 1month and then observed with a lag of 2-3 months depending whether they use an interpolated fixing or not.  Here, we make the swap use the interpolation of the index to avoid incompatibilities.
		/// </summary>
	    IZeroCouponInflationSwap Create (QL.Instruments.ZeroCouponInflationSwap.TypeEnum type, Double nominal, DateTime startDate, DateTime maturity, Cephei.QL.Times.ICalendar fixCalendar, QL.Times.BusinessDayConventionEnum fixConvention, Cephei.QL.Times.IDayCounter dayCounter, Double fixedRate, Cephei.QL.Indexes.IZeroInflationIndex infIndex, Cephei.QL.Times.IPeriod observationLag, Microsoft.FSharp.Core.FSharpOption<Boolean> adjustInfObsDates, Microsoft.FSharp.Core.FSharpOption<Cephei.QL.Times.ICalendar> infCalendar, Microsoft.FSharp.Core.FSharpOption<QL.Times.BusinessDayConventionEnum> infConvention, Cephei.QL.IPricingEngine QL_Pricer);
    }
}

